package com.ruoyi.iot.domain.entity;

import io.swagger.v3.oas.annotations.media.Schema;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import lombok.Data;

/**
 * 设备告警记录实体
 */
@Data
@Schema(description = "设备告警记录实体")
public class DeviceAlarmRecord {

    @Schema(description = "主键ID")
    private Long id;

    @Schema(description = "设备编号")
    private String deviceId;

    @Schema(description = "触发指标编码")
    private String metricCode;

    @Schema(description = "指标数值")
    private BigDecimal metricValue;

    @Schema(description = "阈值数值")
    private BigDecimal thresholdValue;

    @Schema(description = "比较符")
    private String comparator;

    @Schema(description = "告警级别（level1/level2/level3）")
    private String alarmLevel;

    @Schema(description = "来源窗口类型（electric/alarm）")
    private String sourceType;

    @Schema(description = "来源窗口结束时间")
    private LocalDateTime windowEnd;

    @Schema(description = "创建时间")
    private LocalDateTime createdAt;

    @Schema(description = "更新时间")
    private LocalDateTime updatedAt;
}